package com.alpaak.common.utils;

import java.util.*;

public class StringUtil {

	public static boolean isNullOrEmpty(String string) {
		return ((string == null) || (string.length() == 0));
	}

	public static boolean isNotNullOrEmpty(String string) {
		return (!isNullOrEmpty(string));
	}

	/**
	 * 方法作用：将以某种特殊符号分隔的字符串转换成List
	 * @param str
	 * @param splitChar
	 * @return
	 */
	@SuppressWarnings({ "rawtypes" })
	public static List strSplit2List(String str, String splitChar) {
		if (isNullOrEmpty(str) || isNullOrEmpty(splitChar))
			return new ArrayList();

		String[] newstr = str.split(splitChar);

		return Arrays.asList(newstr);
	}

	public static String trim(String s) {
		if (s == null) {
			return null;
		}
		return s.trim();
	}

	public static String toUpperCase(String s) {
		if (s == null) {
			return null;
		}
		return s.toUpperCase();
	}

	public static String toLowerCase(String s) {
		if (s == null) {
			return null;
		}
		return s.toLowerCase();
	}

	public static String deal(String val) {
		val = StringReplace("\"", "’", val);
		val = StringReplace(">", "’", val);
		val = StringReplace("<", "’", val);
		return val;
	}
	
	/**
	 * 将文本中的特殊字符转义
	 * @param val
	 * @return
	 */
	public static String escape(String val) {
		val = StringReplace("\\", "\\\\", val);
		val = StringReplace("[", "\\[", val);
		val = StringReplace("]", "\\]", val);
		val = StringReplace("(", "\\(", val);
		val = StringReplace(")", "\\)", val);
		val = StringReplace("?", "\\?", val);
		val = StringReplace("{", "\\{", val);
		val = StringReplace("}", "\\}", val);
		val = StringReplace("|", "\\|", val);
		val = StringReplace("+", "\\+", val);
		val = StringReplace("*", "\\*", val);
		val = StringReplace("$", "\\$", val);
		val = StringReplace("^", "\\^", val);
		return val;
	}

	public static String toHtmlInput(String s) {
		if (s == null) {
			return null;
		}
		String s1 = new String(s);
		s1 = StringReplace("&", "&amp;", s1);
		s1 = StringReplace("<", "&lt;", s1);
		s1 = StringReplace(">", "&gt;", s1);
		return s1;
	}

	public static String getFormatPath(String path) {
		String separator = "/";
		path = StringReplace("\\\\", separator, path);
		path = StringReplace("\\", separator, path);
		path = StringReplace("//", separator, path);
		path = StringReplace("/", separator, path);
		return path;
	}

	public static String toHtml(String s) {
		if (s == null) {
			return null;
		}
		String s1 = new String(s);
		s1 = toHtmlInput(s1);
		s1 = StringReplace("\r\n", "\n", s);
		s1 = StringReplace("\n", "<br>\n", s);
		s1 = StringReplace("\t", "    ", s);
		s1 = StringReplace("  ", " &nbsp;", s);
		return s1;
	}

	public static String URLParameter(String s) {
		String ret = s;
		ret = StringReplace("+", "%2B", ret);
		ret = StringReplace(" ", "%20", ret);
		ret = StringReplace(" ", "%20", ret);
		return ret;
	}

	public static String delete_htm(String htmStr) {
		boolean boo = true;
		StringBuffer retStrB = new StringBuffer();
		if ((htmStr == null) || (htmStr.length() == 0)) {
			return "";
		}
		for (int i = 0; i < htmStr.length(); i++) {
			if (htmStr.substring(i, i + 1).equals("<")) {
				boo = false;
			}
			if (htmStr.substring(i, i + 1).equals(">")) {
				boo = true;
			}
			if (boo)
				retStrB.append(htmStr.substring(i, i + 1));
		}
		String retStr = retStrB.toString();
		retStr = StringReplace(">", "", retStr);

		return retStr;
	}

	public static String delete_htmAndTrim(String htmStr, int length) {
		String s = toOmit(delete_htm(htmStr), length, 0);
		return s;
	}

	public static String toOmit(String str, int len1, int len2) {
		if (len1 == 0)
			len1 = 112;
		if (str == null)
			str = "";
		else if (str.length() >= len1) {
			if (len2 == 0)
				str = str.substring(0, len1) + "……";
			else {
				str = fillString(str, '.', len2, 2);
			}
		} else if (len2 > 0) {
			str = fillString(str, '.', len2, 2);
		}

		return str;
	}

	public static String StringReplace(String from, String to, String source) {
		if ((source == null) || (to == null) || (from == null)) {
			return source;
		}

		int i = -1;
		i = source.indexOf(from);
		while (i != -1) {
			source = source.substring(0, i).concat(to)
					.concat(source.substring(i + from.length()));
			i = source.indexOf(from, i + to.length());
		}
		return source;
	}

	public static String[] getAsStringArray(String s_value, String delim) {
		if (s_value == null) {
			return null;
		}
		if ((delim == null) || (delim.equalsIgnoreCase(""))) {
			delim = ",";
		}
		String[] s = new String[getSubtringCount(s_value, delim) + 1];
		int firstindex = s_value.indexOf(delim);
		if (firstindex == -1) {
			s[0] = s_value;
		} else {
			int i = 0;
			while (firstindex != -1) {
				s[i] = s_value.substring(0, firstindex);
				s_value = s_value.substring(firstindex + delim.length(),
						s_value.length());
				firstindex = s_value.indexOf(delim);
				i++;
			}
			s[i] = s_value;
		}
		return s;
	}

	public static String[] split(String source, String chr) {
		if (source == null) {
			String[] wordLists = new String[1];
			wordLists[0] = source;
			return wordLists;
		}
		if (chr == null) {
			chr = ",";
		}
		StringTokenizer st = new StringTokenizer(source, chr);
		int total = st.countTokens();
		String[] wordLists = new String[total];
		for (int i = 0; i < total; i++) {
			wordLists[i] = st.nextToken();
		}
		return wordLists;
	}
	
	public static List<String> splitToList(String source, String chr) {
		if (source == null) {
			String[] wordLists = new String[1];
			wordLists[0] = source;
			return null;
		}
		if (chr == null) {
			chr = ",";
		}
		StringTokenizer st = new StringTokenizer(source, chr);
		int total = st.countTokens();
		String[] wordLists = new String[total];
		for (int i = 0; i < total; i++) {
			wordLists[i] = st.nextToken();
		}
		return Arrays.asList(wordLists);
	}

	public static String[] split(String source, char chr) {
		return split(source, String.valueOf(chr));
	}

	public static String spaceToNBSP(String s) {
		if ((s == null) || (s.equals(""))) {
			return "&nbsp;";
		}
		return s;
	}

	public static String byteSubstring(String src, int start_idx, int end_idx) {
		byte[] b = src.getBytes();
		String tgt = "";
		for (int i = start_idx; i <= end_idx; i++) {
			tgt = tgt + (char) b[i];
		}
		return tgt;
	}

	public static String getSubstring(String s_value, String code) {
		int id = s_value.indexOf(code) + 1;
		return s_value.substring(id);
	}

	public static String getReplaceString(String prefix, String source,
			String[] values) {
		String result = source;
		if ((source == null) || (values == null) || (values.length < 1)) {
			return source;
		}
		if (prefix == null) {
			prefix = "%";
		}

		for (int i = 0; i < values.length; i++) {
			String argument = prefix + Integer.toString(i + 1);
			int index = result.indexOf(argument);
			if (index != -1) {
				String temp = result.substring(0, index);
				if (i < values.length)
					temp = temp + values[i];
				else {
					temp = temp + values[(values.length - 1)];
				}
				temp = temp + result.substring(index + 2);
				result = temp;
			}
		}
		return result;
	}

	public static String getReplaceString(String source, String[] values) {
		return getReplaceString("%", source, values);
	}

	public static boolean contains(String[] strings, String string,
			boolean caseSensitive) {
		for (int i = 0; i < strings.length; i++) {
			if (caseSensitive) {
				if (strings[i].equals(string)) {
					return true;
				}
			} else if (strings[i].equalsIgnoreCase(string)) {
				return true;
			}
		}

		return false;
	}

	public static String combineStringArray(String[] array, String delim) {
		if (array == null) {
			return "";
		}
		if (delim == null) {
			delim = "";
		}

		int length = array.length - 1;
		StringBuffer result = new StringBuffer(length * 8);
		for (int i = 0; i < length; i++) {
			if ((array[i] != null) && (!"".equals(array[i]))) {
				result.append(array[i]);
				result.append(delim);
			}
		}
		result.append(array[length]);
		return result.toString();
	}

	public static String fillString(char c, int length) {
		String ret = "";
		for (int i = 0; i < length; i++) {
			ret = ret + c;
		}
		return ret;
	}

	public static String fillString(String source, char c, int len, int type) {
		if (source == null) {
			source = "";
		}
		if (source.length() < len) {
			String temp = fillString(c, len - source.length());
			if (type == 1)
				source = temp + source;
			else {
				source = source + temp;
			}
		}
		return source;
	}

	public static String[] fillString(String[] source, char c, int len, int type) {
		String[] ret = new String[source.length];
		for (int i = 0; i < source.length; i++) {
			ret[i] = fillString(source[i], c, len, type);
		}
		return ret;
	}

	public static int getByteLength(String source) {
		int len = 0;
		for (int i = 0; i < source.length(); i++) {
			char c = source.charAt(i);
			int highByte = c >>> '\b';
			len += (highByte == 0 ? 1 : 2);
		}
		return len;
	}

	public static int getSubtringCount(String source, String sub) {
		if ((source == null) || (source.length() == 0)) {
			return 0;
		}
		int count = 0;
		for (int index = source.indexOf(sub); index >= 0; index = source
				.indexOf(sub, index + 1))
			count++;
		return count;
	}

	public static String fillZero(String s, int i) {
		String s1;
		if (s.length() < i) {
			char[] ac = new char[i - s.length()];
			for (int j = 0; j < i - s.length(); j++) {
				ac[j] = '0';
			}
			s1 = new String(ac) + s;
		} else {
			s1 = s;
		}
		return s1;
	}

	public static String getHtmlURLValue(String url, String value) {
		int num = url.indexOf(value);
		if (num > 0) {
			String sub = url.substring(num);
			if (sub.indexOf("&") > 0) {
				return sub.substring(sub.indexOf("=") + 1, sub.indexOf("&"))
						.trim();
			}
			return sub.substring(sub.indexOf("=") + 1).trim();
		}

		return null;
	}

	public static boolean isNotBlank(String str) {
		int strLen;
		if ((str == null) || ((strLen = str.length()) == 0))
			return false;
		for (int i = 0; i < strLen; i++) {
			if (!Character.isWhitespace(str.charAt(i)))
				return true;
		}
		return false;
	}
	
	public static boolean isBlank(String str) {
		int length;
		if (str != null && (length = str.length()) != 0) {
			for (int i = 0; i < length; ++i) {
				if (!Character.isWhitespace(str.charAt(i))) {
					return false;
				}
			}

			return true;
		} else {
			return true;
		}
	}

	public static boolean isNumber(String name) {
		if ((name == null) || (name.trim().equals("")))
			return false;
		boolean isNumberChar = true;
		int i = 0;

		while ((isNumberChar) && (i < name.length())) {
			char x = name.charAt(i);
			if ((x < '0') || (x > '9'))
				isNumberChar = false;
			i++;
		}
		return isNumberChar;
	}

	public static String isNull(String obj, String view) {
		String str = obj;
		if ((str == null) || (str.equals("null")) || (str.equals(""))) {
			if ((view == null) || (view.equals("null")) || ("".equals(view)))
				str = "";
			else
				str = view;
		} else {
			str = str.trim();
		}
		return str;
	}

	public static String MnemonicWords(String hzString) throws Exception {
		if ((hzString == null) || (hzString.length() == 0)) {
			return "";
		}
		int ch1code = 0;
		int ch2code = 0;

		StringBuffer pyBuffer = new StringBuffer();
		byte[] eB = hzString.getBytes("gbk");
		int len = eB.length;

		int pyi = 0;
		while (pyi < len) {
			char ch1 = (char) eB[pyi];
			pyi++;
			ch1code = ch1;
			if ((ch1code > 0) && (ch1code < 129)) {
				pyBuffer.append(ch1);
			} else {
				ch1 = (char) ('Ā' + ch1);
				char ch2;
				if (eB[pyi] < 0)
					ch2 = (char) (256 + eB[pyi]);
				else {
					ch2 = (char) eB[pyi];
				}
				pyi++;
				if (pyi > len) {
					break;
				}
				ch1code = ch1;
				ch2code = ch2;
				if ((ch1code <= 254) && (ch1code >= 170)) {
					if (ch2code > 160) {
						int no = (ch1code - 176) * 94 + (ch2code - 160);
						pyBuffer.append("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbpbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbpbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbpbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccczccccccccccccccccccccccccccccccccccccccccccccccccccsccccccccccccccccccccccccccccccccccccccccccccccccccccccczccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddzdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddtdddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpffffffffffffffffffffggggggggggggggggggggggggggggggggggghggggggggggggghggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhmhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjyjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkgkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkhkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnoooooooopppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppbqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssxsssssssssssssssssssssssssssttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzczzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz     cjwgnspgcgnesypbtyyzdxykygtdjnnjqmbsjzscyjsyyfpgkbzgylywjkgkljywkpjqhytwddzlsymrypywwcckznkyygttngjnykkzytcjnmcylqlypysfqrpzslwbtgkjfyxjwzltbncxjjjjtxdttsqzycdxxhgckbphffsswybgmxlpbylllhlxstzmyjhsojnghdzqyklgjhsgqzhxqgkxzzwyscscjxyeyxadzpmdssmzjzqjyzcdjzwqjbyzbjgznzcpwhwxhqkmwfbpbydtjzzkxxylygxfptyjyyzpszlfchmqshgmxxsxjyqdcsbbqbefsjyhxwgzkpylqbgldlcdtnmaeddkssngycsgxlyzaypnptsdkdylhgymylcxpycjndqjwxqxfyyfjlejpzrxccqwqqsbzkymgplbmjrqcflnymyqmtqyrbcjthztqfrxqhxmqjcjlyxgjmshzkbswyemyltxfsydsglycjqxsjnqbsctyhbftdcyjdjyyghqfsxwckqkxebptlpxjzsrmebwhjlpjslyysmdxlclqkxlhxjrzjmfqhxhwywsbhtrxxglhqhfnmgykldyxzpylggtmtcfpnjjzyljtyanjgbjplqgszyqyaxbkysecjsznslyzhzxlzcghpxzhznytdsbcjkdlzayfmytlebbgqyzkggldndnyskjshdlyxbcgyxypkdjmmzngmmclgezszxzjfznmlzzthcsydbdllscddnlkjykjsycjlkwhqasdknhcsgaehdaashtcplcpqybsdmpjlpzjoqlcdhjxysprchnwjnlhlyyqyhwzptczgwwmzffjqqqqyxaclbhkdjxdgmmydqxzllsygxgkjrywzwyclzmssjzldbydcpcxyhlxchyzjqsfqagmnyxpfrkssbjlyxysyglnscmhcwwmnzjjlxxhchsyzsttxrycyxbyhcsmxjsznpwgpxxtaybgajcxlysdccwzocwkccsbnhcpdyznfcyytyckxkybsqkkytqqxfcwchcykelzqbsqyjqcclmthsywhmktlkjlycxwheqqhtqkjpqsqscfymmdmgbwhwlgsllystlmlxpthmjhwljzyhzjxhtxjlhxrswlwzjcbxmhzqxsdzpsgfcsglsxymqshxpjxwmyqksmyplrthbxftpmhyxlchlhlzylxgsssstclsldclrpbhzhxyyfhbbgdmycnqqwlqhjjzywjzyejjdhpblqxtqkwhlchqxagtlxljxmsljhtzkzjecxjcjnmfbycsfywybjzgnysdzsqyrsljpclpwxsdwejbjcbcnaytwgmpapclyqpclzxsbnmsggfnzjjbzsfzyndxhplqkzczwalsbccjxjyzgwkypsgxfzfcdkhjgxtlqfsgdslqwzkxtmhsbgzmjzrglyjbpmlmsxlzjqzhzyjczydjwfmjklddpmjegxyhylxhlqyqhkycwcjmyyxnatjhyccxzpcqlbzwwytwsqcmlpmyrjcccxfpznzzljplxxyztzlgdltcklyrzzgqtkjhhgjljaxfgfjzslcfdqzlclgjdjcsnzlljpjqdcclcjxmyzftsxgcgsbrzxjqqctzhgyqtjqqlzxjylylncyamcstylpdjbyregklzyzhlyszqlznwczcllwjqjjjkdgjzolbbzppglghtgzxyjhzmycnqsycyhbhgxkamtxyxnbskyzzgjzlqjtfcjxdygjqjjpmgwgjjjpkqsbgbmmcjssclpqpdxcdyykyfcjddyygywrhjrtgznyqldkljszzgzqzjgdykshpzmtlcpwnjyfyzdjcnmwescyglbtzcgmssllyxqsxxbsjsbbsgghfjlypmzjnlyywdqshzxtyywhmcyhywdbxbtlmsyyyfsxjchtxxlhjhfssxzqhfzmzcztqcxzxrttdjhnnyzqqmtqdmmz ytxmjgdxcdyzbffallztdltfxmxqzdngwqdbdczjdxbzgsqqddjcmbkzffxmkdmdsyyszcmljdsynsprskmkmpcklgdbqtfzswtfgglyplljzhgjjgypzltcsmcnbtjbqfkdhpyzgkpbbymtdssxtbnpdkleycjnyddykzddhqhsdzsctarlltkzlgecllkjlqjaqnbdkkghpjxzqksecshalqfmmgjnlyjbbtmlyzxdxjpldlpcqdhzycbzsczbzmsljflkrzjsnfrgjhxpdhyjybzgdlqcsezgxlblhyxtwmabchecmwyjyzlljjyhlgbdjlslygkdzpzxjyyzlwcxszfgwyydlyhcljscmbjhblyzlycblydpdqysxqzbytdkyxlyycnrjmpdqgklcljbcxbjddbblblczqrppxjcjlzcshltoljnmdddlngkathqhjhykheznmshrphqqjchgmfprxhjgdychgklyrzqlcyqjnzsqtkqjymszxwlcfqqqxyfggyptqwlmcrnfkkfsyylybmqammmyxctpshcptxxzzsmphpshmclmldqfyqxszyjdjjzzhqpdszglstjbckbxyqzjsgpsxqzqzrqtbdkwxzkhhgflbcsmdldgdzdblzyycxnncsybzbfglzzxswmsccmqnjqsbdqsjtxxmbltxcclzshzcxrqjgjylxzfjphymzqqydfqjqlzznzjcdgzygztxmzysctlkphtxhtlbjxjlxscdqxcbbtjfqzfsltjbtkqbxxjjljchczdbzjdczjdcprnpqcjpfczlclzxzdmxmphjsgzgszzqlylwtjpfsyaxmcjbtzyycwmytzsjjlqcqlwzmalbxyfbpnlsfhtgjwejjxxglljstgshjqlzfkcgnndszfdeqfhbsaqtgylbxmmygszldydqmjjrgbjtkgdhgkblqkbdmbylxwcxyttybkmrtjzxqjbhlmhmjjzmqasldcyxyqdlqcafywyxqhz"
								.charAt(no - 1));
					} else {
						int no = (ch1code - 170) * 97 + (ch2code - 63);
						pyBuffer.append("kxxmzjxsttdzxxbzyshjpfxpqbyljqkyzzzwl zgfwyctjxjpyyspmsmydyshqy zchmjmcagcfbbhplxtyqx djgxdhkxxnbhrmlnjsltsmrnlxqjyzlsqglbhdcgyqyyhwfjybbyjyjjdpqyapfxcgjscrssyz lbzjjjlgxzyxyxsqkxbxxgcxpld wetdwwcjmbtxchxyxxfxllj fwdpzsmylmwytcbcecblgdbqzqfjdjhymcxtxdrmjwrh xcjzylqdyhlsrsywwzjymtllltqcjzbtckzcyqjzqalmyhwwdxzxqdllqsgjfjljhjazdjgtkhsstcyjfpszlxzxrwgldlzr lzqtgslllllyxxqgdzybphl x bpfd   hy jcc dmzppz cyqxldozlwdwyythcqsccrsslfzfp qmbjxlmyfgjb m jwdn mmjtgbdzlp hsymjyl hdzjcctlcl ljcpddqdsznbgzxxcxqycbzxzfzfjsnttjyhtcmjxtmxspdsypzgmljtycbmdkycsz zyfyctgwhkyjxgyclndzscyzssdllqflqllxfdyhxggnywyllsdlbbjcyjzmlhl xyyytdlllb b bqjzmpclmjpgehbcqax hhhzchxyhjaxhlphjgpqqzgjjzzgzdqybzhhbwyffqdlzljxjpalxzdaglgwqyxxxfmmsypfmxsyzyshdzkxsmmzzsdnzcfp ltzdnmxzymzmmxhhczjemxxksthwlsqlzllsjphlgzyhmxxhgzcjmhxtxfwkmwkdthmfzzydkmsclcmghsxpslcxyxmkxyah jzmcsnxyymmpmlgxmhlmlqmxtkzqyszjshyzjzybdqzwzqkdjlfmekzjpezswjmzyltemznplplbpykkqzkeqlwayyplhhaq jkqclhyxxmlyccyskg  lcnszkyzkcqzqljpmzhxlywqlnrydtykwszdxddntqdfqqmgseltthpwtxxlwydlzyzcqqpllkcc ylbqqczcljslzjxddbzqdljxzqjyzqkzljcyqdypp pqykjyrpcbymxkllzllfqpylllmsglcyrytmxyzfdzrysyztfmsmcl ywzgxzggsjsgkdtggzlldzbzhyyzhzywxyzymsdbzyjgtsmtfxqyjssdgslnndlyzzlrxtrznzxnqfmyzjzykbpnlypblnzz jhtzkgyzzrdznfgxskgjttyllgzzbjzklplzylxyxbjfpnjzzxcdxzyxzggrs jksmzjlsjywq yhqjxpjzt lsnshrnypzt wchklpszlcyysjylybbwzpdwgcyxckdzxsgzwwyqyytctdllxwkczkkcclgcqqdzlqcsfqchqhsfmqzlnbbshzdysjqplzcd cwjkjlpcmz jsqyzyhcpydsdzngqmbsflnffgfsm q lgqcyybkjsrjhzldcftlljgjhtxzcszztjggkyoxblzppgtgyjdhz zzllqfzgqjzczbxbsxpxhyyclwdqjjxmfdfzhqqmqg yhtycrznqxgpdzcszcljbhbzcyzzppyzzsgyhckpzjljnsc sllxb mstldfjmkdjslxlsz p pgjllydszgql lkyyhzttnt  tzzbsz ztlljtyyll llqyzqlbdzlslyyzyfszsnhnc   bbwsk rbc zm  gjmzlshtslzbl q xflyljqbzg stbmzjlxfnb xjztsfjmssnxlkbhsjxtnlzdntljjgzjyjczxygyhwrwqnztn fjszpzshzjfyrdjfcjzbfzqchzxfxsbzqlzsgyftzdcszxzjbqmszkjrhyjzckmjkhchgtxkjqalxbxfjtrtylxjhdtsjx j jjzmzlcqsbtxhqgxtxxhxftsdkfjhzxjfj  zcdllltqsqzqwqxswtwgwbccgzllqzbclmqqtzhzxzxljfrmyzflxys xxjk xrmqdzdmmyxbsqbhgcmwfwtgmxlzpyytgzyccddyzxs g yjyznbgpzjcqswxcjrtfycgrhztxszzt cbfclsyxzlzqmzlmp lxzjxslbysmqhxxz rxsqzzzsslyflczjrcrxhhzxq dshjsjjhqcxjbcynsssrjbqlpxqpymlxzkyxlxcjlcycxxzzlxlll hrzzdxytyxcxff bpxdgygztcqwyltlswwsgzjmmgtjfsgzyafsmlpfcwbjcljmzlpjjlmdyyyfbygyzgyzyrqqhxy kxygy fsfslnqhcfhccfxblplzyxxxkhhxshjzscxczwhhhplqalpqahxdlgggdrndtpyqjjcljzljlhyhyqydhz zczywteyzxhsl jbdgwxpc  tjckllwkllcsstknzdnqnttlzsszyqkcgbhcrrychfpfyrwqpxxkdbbbqtzkznpcfxmqkcypzxehzkctcmxxmx nwwxjyhlstmcsqdjcxctcnd p lccjlsblplqcdnndscjdpgwmrzclodansyzrdwjjdbcxwstszyljpxloclgpcjfzljyl c cnlckxtpzjwcyxwfzdknjcjlltqcbxnw xbxklylhzlqzllzxwjljjjgcmngjdzxtxcxyxjjxsjtstp ghtxdfptffllxqpk fzflylybqjhzbmddbcycld tddqlyjjwqllcsjpyyclttjpycmgyxzhsztwqwrfzhjgazmrhcyy ptdlybyznbbxyxhzddnh msgbwfzzjcyxllrzcyxzlwjgcggnycpmzqzhfgtcjeaqcpjcs dczdwldfrypysccwbxgzmzztqscpxxjcjychcjwsnxxwjn mt mcdqdcllwnk zgglcczmlbqjqdsjzzghqywbzjlttdhhcchflsjyscgc zjbypbpdqkxwyyflxncwcxbmaykkjwzzzrxy yqjfljphhhytzqmhsgzqwbwjdysqzxslzyymyszg x hysyscsyznlqyljxcxtlwdqzpcycyppnxfyrcmsmslxglgctlxzgz g tc dsllyxmtzalcpxjtjwtcyyjblbzlqmylxpghdlssdhbdcsxhamlzpjmcnhjysygchskqmc lwjxsmocdrlyqzhjmyby lyetfjfrfksyxftwdsxxlysjslyxsnxyyxhahhjzxwmljcsqlkydztzsxfdxgzjksxybdpwnzwpczczenycxqfjykbdmljqq lxslyxxylljdzbsmhpsttqqwlhogyblzzalxqlzerrqlstmypyxjjxqsjpbryxyjlxyqylthylymlkljt llhfzwkhljlhlj klj tlqxylmbtxchxcfxlhhhjbyzzkbxsdqc jzsyhzxfebcqwyyjqtzyqhqqzmwffhfrbntpcjlfzgppxdbbztg gchmfly xlxpqsywmngqlxjqjtcbhxspxlbyyjddhsjqyjxlldtkhhbfwdysqrnwldebzwcydljtmxmjsxyrwfymwrxxysztzztymldq xlyq jtscxwlprjwxhyphydnxhgmywytzcs tsdlwdcqpyclqyjwxwzzmylclmxcmzsqtzpjqblgxjzfljjytjnxmcxs cdl dyjdqcxsqyclzxzzxmxqrjhzjphfljlmlqnldxzlllfypnyysxcqqcmjzzhnpzmekmxkyqlxstxxhwdcwdzgyyfpjzdyzjzx rzjchrtlpyzbsjhxzypbdfgzzrytngxcqy b cckrjjbjerzgy  xknsjkljsjzljybzsqlbcktylccclpfyadzyqgk tsfc xdkdyxyfttyh  wtghrynjsbsnyjhkllslydxxwbcjsbbpjzjcjdzbfxxbrjlaygcsndcdszblpz dwsbxbcllxxlzdjzsjy lyxfffbhjjxgbygjpmmmpssdzjmtlyzjxswxtyledqpjmygqzjgdblqjwjqllsdgytqjczcjdzxqgsgjhqxnqlzbxsgzhcxy ljxyxydfqqjjfxdhctxjyrxysqtjxyebyyssyxjxncyzxfxmsyszxy schshxzzzgzcgfjdltynpzgyjyztyqzpbxcbdztzc zyxxyhhsqxshdhgqhjhgxwsztmmlhyxgcbtclzkkwjzrclekxtdbcykqqsayxcjxwwgsbhjyzs  csjkqcxswxfltynytpzc czjqtzwjqdzzzqzljjxlsbhpyxxpsxshheztxfptjqyzzxhyaxncfzyyhxgnxmywxtcspdhhgymxmxqcxtsbcqsjyxxtyyly pclmmszmjzzllcogxzaajzyhjmzxhdxzsxzdzxleyjjzjbhzmzzzqtzpsxztdsxjjlnyazhhyysrnqdthzhayjyjhdzjzlsw cltbzyecwcycrylcxnhzydzydtrxxbzsxqhxjhhlxxlhdlqfdbsxfzzyychtyyjbhecjkgjfxhzjfxhwhdzfyapnpgnymshk mamnbyjtmxyjcthjbzyfcgtyhwphftwzzezsbzegpbmtskftycmhbllhgpzjxzjgzjyxzsbbqsczzlzccstpgxmjsftcczjz djxcybzlfcjsyzfgszlybcwzzbyzdzypswyjgxzbdsysxlgzybzfyxxxccxtzlsqyxzjqdcztdxzjjqcgxtdgscxzsyjjqcc ldqztqchqqjzyezwkjcfypqtynlmkcqzqzbqnyjddzqzxdpzjcdjstcjnxbcmsjqmjqwwjqnjnlllwqcqqdzpzydcydzcttf znztqzdtjlzbclltdsxkjzqdpzlzntjxzbcjltqjldgdbbjqdcjwynzyzcdwllxwlrxntqqczxkjld tdgl lajjkly kqll dz td ycggjyxdxfrskstqdenqmrkq  hgkdldazfkypbggpzrebzzykyqspegjjglkqzzzslysywqzwfqzylzzlzhwcgkyp qgnpgblplrrjyxcccyyhsbzfybnyytgzxylxczwh zjzblfflgskhyjzeyjhlplllldzlyczblcybbxbcbpnnzc r sycgyy qzwtzdxtedcnzzzty hdynyjlxdjyqdjszwlsh lbczpyzjyctdyntsyctszyyegdw ycxtscysmgzsccsdslccrqxyyelsm xztebblyylltqsyrxfkbxsychbjbwkgskhhjh xgnlycdlfyljgbxqxqqzzplnypxjyqymrbsyyhkxxstmxrczzywxyhymcl lzhqwqxdbxbzwzmldmyskfmklzcyqyczqxzlyyzmddz ftqpczcyypzhzllytztzxdtqcy ksccyyazjpcylzyjtfnyyynrs ylmmnxjsmyb sljqyldzdpqbzzblfndsqkczfywhgqmrdsxycytxnq jpyjbfcjdyzfbrxejdgyqbsrmnfyyqpghyjdyzxgr htk leq zntsmpklbsgbpyszbydjzsstjzytxzphsszsbzczptqfzmyflypybbjgxzmxxdjmtsyskkbzxhjcelbsmjyjzcxt mljshrzzslxjqpyzxmkygxxjcljprmyygadyskqs dhrzkqxzyztcghytlmljxybsyctbhjhjfcwzsxwwtkzlxqshlyjzjxe mplprcglt zztlnjcyjgdtclklpllqpjmzbapxyzlkktgdwczzbnzdtdyqzjyjgmctxltgcszlmlhbglk  njhdxphlfmkyd lgxdtwzfrjejztzhydxykshwfzcqshknqqhtzhxmjdjskhxzjzbzzxympagjmstbxlskyynwrtsqlscbpspsgzwyhtlksssw hzzlyytnxjgmjszsxfwnlsoztxgxlsmmlbwldszylkqcqctmycfjbslxclzzclxxksbjqclhjpsqplsxxckslnhpsfqqytxy jzlqldtzqjzdyydjnzpd cdskjfsljhylzsqzlbtxxdgtqbdyazxdzhzjnhhqbyknxjjqczmlljzkspldsclbblzkleljlbq ycxjxgcnlcqplzlznjtzlxyxpxmyzxwyczyhzbtrblxlcczjadjlmmmsssmybhb kkbhrsxxjmxsdynzpelbbrhwghfchgm  klltsjyycqltskywyyhywxbxqywbawykqldq tmtkhqcgdqktgpkxhcpthtwthkshthlxyzyydaspkyzpceqdltbdssegyjq xcwxssbz dfydlyjcls yzyexcyysdwnzajgyhywtjdaxysrltdpsyxfnejdy lxllqzyqqhgjhzycshwshczyjxllnxzjjn fxmfpycyawddhdmczlqzhzyztldywllhymmylmbwwkxydtyldjpyw xjwmllsafdllyflb   bqtzcqljtfmbthydcqrddwr qnysnmzbyytbjhp ygtjahg tbstxkbtzbkldbeqqhqmjdyttxpgbktlgqxjjjcthxqdwjlwrfwqgwqhckryswgftgygbxsd wdfjxxxjzlpyyypayxhydqkxsaxyxgskqhykfdddpplcjlhqeewxksyykdbplfjtpkjltcyyhhjttpltzzcdlshqkzjqyste eywyyzy xyysttjkllpwmcyhqgxyhcrmbxpllnqtjhyylfd fxzpsftljxxjbswyysksflxlpplbbblbsfxyzsylfffscjds tztryysyffsyzszbjtbctsbsdhrtjjbytcxyje xbnebjdsysykgsjzbxbytfzwgenhhhhzhhtfwgzstbgxklsty mtmbyxj skzscdyjrcwxzfhmymcxlzndtdh xdjggybfbnbpthfjaaxwfpxmyphdttcxzzpxrsywzdlybbjd qwqjpzypzjznjpzjlzt fysbttslmptzrtdxqsjehbzyj dhljsqmlhtxtjecxslzzspktlzkqqyfs gywpcpqfhqhytqxzkrsg gsjczlptxcdyyzss qzslxlzmycbcqbzyxhbsxlzdltcdjtylzjyyzpzylltxjsjxhlbrypxqzskswwwygyabbztqktgpyspxbjcmllxztbklgqkq lsktfxrdkbfpftbbrfeeqgypzsstlbtpszzsjdhlqlzpmsmmsxlqqnknbrddnxxdhddjyyyfqgzlxsmjqgxytqlgpbqxcyzy drj gtdjyhqshtmjsbwplwhlzffny  gxqhpltbqpfbcwqdbygpnztbfzjgsdctjshxeawzzylltyybwjkxxghlfk djtmsz sqynzggswqsphtlsskmcl  yszqqxncjdqgzdlfnykljcjllzlmzjn   schthxzlzjbbhqzwwycrdhlyqqjbeyfsjxwhsr  wjhwpslmssgzttygyqqwr lalhmjtqjcmxqbjjzjxtyzkxbyqxbjxshzssfjlxmx  fghkzszggylcls rjyhslllmzxelgl xdjtbgyzbpktzhkzjyqsbctwwqjpqwxhgzgdyfljbyfdjf hsfmbyzhqgfwqsyfyjgphzbyyzffwodjrlmftwlbzgycqxcdj ygzyyyyhy xdwegazyhxjlzythlrmgrxxzcl   ljjtjtbwjybjjbxjjtjteekhwslj lpsfyzpqqbdlqjjtyyqlyzkdksqj yyqzldqtgjj  js cmraqthtejmfctyhypkmhycwj cfhyyxwshctxrljhjshccyyyjltkttytmxgtcjtzaxyoczlylbszyw jytsjyhbyshfjlygjxxtmzyyltxxypzlxyjzyzyybnhmymdyylblhlsyygqllscxlxhdwkqgyshqywljyyhzmsljljxcjjyy cbcpzjmylcqlnjqjlxyjmlzjqlycmhcfmmfpqqmfxlmcfqmm znfhjgtthkhchydxtmqzymyytyyyzzdcymzydlfmycqzwzz mabtbcmzzgdfycgcytt fwfdtzqssstxjhxytsxlywwkxexwznnqzjzjjccchyyxbzxzcyjtllcqxynjycyycynzzqyyyewy czdcjyhympwpymlgkdldqqbchjxy                                                                          sypszsjczc     cqytsjljjt   "
								.charAt(no - 1));
					}
				} else {
					if ((ch1code > 160) || (ch1code < 129))
						continue;
					int no = (ch1code - 129) * 191 + (ch2code - 63);
					pyBuffer.append("ksxsm sdqlybjjjgczbjfya jhphsyzgj   sn      xy  ng    lggllyjds yssgyqyd xjyydldwjjwbbftbxthhbczcrfmqwyfcwdzpyddwyxjajpsfnzyjxxxcxnnxxzzbpysyzhmzbqbzcycbxqsbhhxgfmbhhgqcxsthlygymxalelccxzrcsd njjtzzcljdtstbnxtyxsgkwyflhjqspxmxxdc lshxjbcfybyxhczbjyzlwlcz gtsmtzxpqglsjfzzlslhdzbwjncjysnycqrzcwybtyftwecskdcbxhyzqyyxzcffzmjyxxsdcztbzjwszsxyrnygmdthjxsqqccsbxrytsyfbjzgclyzzbszyzqscjhzqydxlbpjllmqxtydzsqjtzplcgqtzwjbhcjdyfxjelbgxxmyjjqfzasyjnsydk jcjszcbatdclnjqmwnqncllkbybzzsyhjqltwlccxthllzntylnzxddtcenjyskkfksdkghwnlsjt jymrymzjgjmzgxykymsmjklfxmtghpfmqjsmtgjqdgyalcmzcsdjlxdffjc f  ffkgpkhrcjqcjdwjlfqdmlzbjjscgckdejcjdlzyckscclfcq czgpdqzjj hddwgsjdkccctllpskghzzljlgjgjjtjjjzczmlzyjkxzyzmljkywxmkjlkjgmclykjqlblkmdxwyxysllpsjqjqxyqfjtjdmxxllcrqyjb xgg pjygegdjgnjyjkhqfqzkhyghdgllsdjjxkyoxnzsxwwxdcskxxjyqscsqkjexsyzhydz ptqyzmtstzfsyldqagylcqlyyyhlrq ldhsssadsjbrszxsjyrcgqc hmmxzdyohycqgphhynxrhgjlgwqwjhcstwasjpmmrdsztxyqpzxyhyqxtpbfyhhdwzbtxhqeexzxxkstexgltxydn  hyktmzhxlplbmlsfhyyggbhyqtxwlqczydqdq gd lls zwjqwqajnytlxanzdecxzwwsgqqdyztchyqzlxygzglydqtjtadyzzcwyzymhyhyjzwsxhzylyskqysbcyw  xjzgtyxqsyhxmchrwjpwxzlwjs sgnqbalzzmtjcjktsaxljhhgoxzcpdmhgtysjxhmrlxjkxhmqxctxwzbkhzccdytxqhlxhyx syydz znhxqyaygypdhdd pyzndltwxydpzjjcxmtlhbynyymhzllhnmylllmdcppxmxdkycydltxchhznaclcclylzsxzjnzln lhyntkyjpychegttgqrgtgyhhlgcwyqkpyyyttttlhyllyttplkyzqqzdq  nmjzxyqmktfbjdjjdxbtqzgtsyflqgxblzfh zadpmjhlccyhdzfgydgcyxs hd d axxbpbyyaxcqffqyjxdljjzl bjydyqszwjlzkcdtctbkdyzdqjnkknjgyeglfykasntchblwzbymjnygzyheyfjmctyfzjjhgck lxhdwxxjkyykssmwctqzlpbzdtwzxzag kwxl lspbclloqmmzslbczzkdcz xgqqdcytzqwzqssfpktfqdcdshdtdwfhtdy jaqqkybdjyxtlj drqxxxaydrjlklytwhllrllcxylbw z  zzhkhxksmdsyyjpzbsqlcxxnxwmdq gqmmczjgttybhyjbetpjxdqhkzbhfdxkawtwajldyjsfhblddqjncxfjhdfjjwzpkzypcyzynxff ydbzznytxzembsehxfzmbflzrsymzjrdjgxhjgjjnzzxhgxhymlpeyyxtgqshxssxmfmkcctxnypszhzptxwywxyysljsqxzdleelmcpjclxsqhfwwtfftnqjjjdxhwlyznflnkyyjldx hdynrjtywtrmdrqhwqcmfjdyzhmyyxjwzqtxtlmrspwwchjb xygcyyrrlmpymkszyjrmysntplnbpyyxmykyngjzznlzhhanmpgwjdzmxxmllhgdzxyhxkrycjmffxyhjfssqlxxndyca nmtcjcyprrnytyqym sxndlylyljnlxyshqmllyzljzxstyzsmcqynzlxbnnylrqtryyjzzhsytxcqgxzsshmkczyqhzjnbh qsnjnzybknlqhznswxkhjyybqlbfl p bkqzxsddjmessmlxxkwnmwwwydkzggtggxbjtdszxnxwmlptfxlcxjjljzxnwxlyhhlrwhsc ybyawjjcwqqjzzyjgxpltzftpakqptlc  xtx hklefdleegqymsawhmljtwyqlyjeybqfnlyxrdsctggxyyn kyqctlhjlmkkcgygllldzydhzwpjzkdyzzhyyfqytyzsezzlymhjhtwyzlkyywzcskqqtdxwctyjklwqbdqyncs szjlkcdcdtlzzacqqzzddxyplxzbqjylzllqdzqgyjyjsyxnyyynyjxkxdazwrdljyyynjlxllhxjcykynqcclddnyyykyhhjcl pb qzzyjxj fzdnfpzhddwfmyypqjrssqzsqdgpzjwdsjdhzxwybp gptmjthzsbgzmbjczwbbzmqcfmbdmcjxljbgjtz mqdyxjzyctyztzxtgkmybbcljssqymscx jeglxszbqjjlyxlyctsxmcwfa kbqllljyxtyltxdphnhfqyzyes sdhwdjbsztfd czyqsyjdzjqpbs j fbkjbxtkqhmkwjjlhhyyyyywyycdypczyjzwdlfwxwzzjcxcdjzczlxjjtxbfwpxzptdzbccyhmlxbqlrtgrhqtlf mwwjxjwcysctzqhxwxkjybmpkbnzhqcdtyfxbyxcbhxpsxt m sxlhkmzxydhwxxshqhcyxglcsqypdh my ypyyykzljqtbqxmyhcwllcyl ewcdcmlggqktlxkgndgzyjjlyhqdtnchxwszjydnytcqcbhztbxwgwbxhmyqsycmqkaqyncs qhysqyshjgjcnxkzycxsbxxhyylstyxtymgcpmgcccccmztasgqzjlosqylstmqsqdzljqqyplcycztcqqpbqjclpkhz yyxxdtddsjcxffllxmlwcjcxtspyxndtjsjwxqqjskyylsjhaykxcyydmamdqmlmczncybzkkyflmcsclhxrcjjgslnmtjzzygjddzjzk qgjyyxzxxqhheytmdsyyyqlf zzdywhscyqwdrxqjyazzzdywbjwhyqszywnp  azjbznbyzzyhnscpjmqcy zpnqtbzjkqqhngccxchbzkddnzhjdrlzlsjljyxytbgtcsqmnjpjsrxcfjqhtpzsyjwbzzzlstbwwqsmmfdwjyzctbwzwqcslqgdhqsqlyzlgyxydcbtzkpj gm pnjkyjynhpwsnszzxybyhyzjqjtllcjthgdxxqcbywbwzggqrqzssnpkydznxqxjmy dstzplthzwxwqtzenqzw ksscsjccgptcslccgllzxczqthnjgyqznmckcstjskbjygqjpldxrgzyxcxhgdnlzwjjctsbcjxbfzzpqdhjtywjynlzzpcjdsqjkdxyajyemmjtdljyryynhjbngzjkmjxltbsllrzylcscnxjllhyllqqqlxymswcxsljmc zlnsdwtjllggjxkyhbpdkmmscsgxjcsdybxdndqykjjtxdygmzzdzslo yjsjzdlbtxxxqqjzlbylwsjjyjtdzqqzzzzjlzcdzjhpl qplffjzysj zfpfzksyjjhxttdxcysmmzcwbbjshfjxfqhyzfsjybxpzlhmbxhzxfywdab lktshxkxjjzthgxh jxkzxszzwhwtzzzsnxqzyawlcwxfxyyhxmyyswqmnlycyspjkhwcqhyljmzxhmcnzhhxcltjplxyjhdyylttxfszhyxxsjbjyayrmlckd yhlrlllstyzyyhscszqxkyqfpflk ntljmmtqyzwtlll s rbdmlqjbcc qywxfzrzdmcyggzjm  mxyfdxc shxncsyjjmpafyfnhyzxyezy sdl zztxgfmyyysnbdnlhpfzdcyfssssn zzdgpafbdbzszbsgcyjlm  z yxqcyxzlckbrbrbzcycjzeeyfgzlyzsfrtkqsxdcmz  jl xscbykjbbrxllfqwjhyqylpzdxczybdhzrbjhwnjtjxlkcfssdqyjkzcwjl b  tzlltlqblcqqccdfpphczlyygjdgwcfczqyyyqyrqzslszfcqnwlhjcjjczkypzzbpdc   jgx gdz  fgpsysdfwwjzjyxyyjyhwpbygxrylybhkjksftzmmkhtyysyyzpyqydywmtjjrhl   tw  bjycfnmgjtysyzmsjyjhhqmyrszwtrtzsskx gqgsptgcznjjcxmxgzt ydjz lsdglhyqgggthszpyjhhgnygkggmdzylczlxqstgzslllmlcskbljzzsmmytpzsqjcj  zxzzcpshkzsxcdfmwrllqxrfzlysdctmxjthjntnrtzfqyhqgllg   sjdjj tqjlnyhszxcgjzypfhdjspcczhjjjzjqdyb sslyttmqtbhjqnnygjyrqyqmzgcjkpd gmyzhqllsllclmholzgdyyfzsljc zlylzqjeshnylljxgjxlyjyyyxnbzljsszcqqzjyllzldj llzllbnyl hxxccqkyjxxxklkseccqkkkcgyyxywtqohthxpyxx hcyeychbbjqcs szs lzylgezwmysx jqqsqyyycmdzywctjsycjkcddjlbdjjzqysqqxxhqjohdyxgmajpchcpljsmtxerxjqd pjdbsmsstktssmmtrzszmldj rn sqxqydyyzbdslnfgpzmdycwfdtmypqwytjzzqjjrjhqbhzpjhnxxyydyhhnmfcpbzpzzlzfmztzmyftskyjyjzhbzzygh pzcscsjssxfjgdyzyhzcwhcsexfqzywklytmlymqpxxskqjpxzhmhqyjs cjlqwhmybdhyylhlglcfytlxcjscpjskphjrtxteylssls yhxscznwtdwjslhtqdjhgydphcqfzljlzptynlmjllqyshhylqqzypbywrfy js yp yrhjnqtfwtwrchygmm yyhsmzhngcelqqmtcwcmpxjjfyysxztybmstsyjdtjqtlhynpyqzlcxznzmylflwby jgsylymzctdwgszslmwzwwqzsayysssapxwcmgxhxdzyjgsjhygscyyxhbbzjkssmalxycfygmqyjycxjlljgczgqjcczotyxmtthlwtgfzkpzcxkjycxctjcyh xsgckxzpsjpxhjwpjgsqxxsdmrszzyzwsykyzshbcsplwsscjhjlchhylhfhhxjsx lnylsdhzxysxlwzyhcldyhzmdyspjtqznwqpsswctst zlmssmnyymjqjzwtyydchqlxkwbgqybkfc jdlzllyylszydwhxpsbcmljscgbhxlqrljxysdwxzsldf hlslymjljylyjcdrjlfsyjfnllcqyqfjy szlylmstdjcyhzllnwlxxygyygxxhhzzxczqzfnwpypkpypmlgxgg dxzzkzfbxxlzptytswhzyxhqhxxxywzyswdmzkxhzphgchj lfjxptzthlyxcrhxshxkjxxzqdcqyl jlkhtxcwhjfwcfpqryqxyqy gpggscsxngkchkzxhflxjbyzwtsxxncyjjmwzjqrhfqsyljzgynslgtcybyxxwyhhxynsqymlywgyqbbzljlpsytjzhyzwlrorjkczjxxyxchdyxyxxjddsqfxyltsfxlmtyjmjjyyxltcxqzqhzlyyxzh nlrhxjcdyhlbrlmrllaxksllljlxxxlycry lccgjcmtlzllyzzpcw jyzeckzdqyqpcjcyzmbbcydcnltrmfgyqbsygmdqqzmkqlpgtbqcjfkjcxbljmswmdt  ldlppbxcwkcbjczhkphyyhzkzmpjysylpnyyxdb"
							.charAt(no - 1));
				}
			}

		}

		return pyBuffer.toString().trim().toLowerCase();
	}
	/**
	 * 字符串数组转字符串 元素用逗号隔开
	 * @param param
	 * @return
	 */
	public static String StringArrayToString(String[] param){
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < param.length; i++){
		 sb. append(param[i]+",");
		}
		String s = sb.toString();
		String a=s.substring(0,sb.length()-1);
		return a;
	}
	
	/**
	 * 取得所给两个字符串中间的字符串
	 * @param text
	 * @param start
	 * @param end
	 * @return
	 */
	public static String subString(String text,String start,String end){
		int indexStart = text.indexOf(start);
		int indexEnd = text.indexOf(end);
		if(indexStart==-1 || indexEnd==-1){
			return "-1";
		}
		
		//text = escape(text);
		start = escape(start).trim();	
		end = escape(end).trim();		
		String[] split = text.split(start);
		//String head = split[0];
		String string = (split[1].split(end))[0].trim();
		
		return string;
	}
	
	public static String subString2j(String str, String strStart, String strEnd) {  
		  
        /* 找出指定的2个字符在 该字符串里面的 位置 */  
        int strStartIndex = str.indexOf(strStart);  
        int strEndIndex = str.indexOf(strEnd);  
  
        /* index 为负数 即表示该字符串中 没有该字符 */  
        if (strStartIndex < 0) {  
            return "-1";  
        }  
        if (strEndIndex < 0) {  
            return "-1";  
        }  
        /* 开始截取 */  
        String result = str.substring(strStartIndex, strEndIndex).substring(strStart.length());  
        return result;  
    }  
	
	public static String parseToUTF(String text){
		try {
			if(text!=null && text!=""){
				text = new String(text.getBytes("ISO8859-1"),"GBK");
			}
		} catch (Exception e) {
			
		}
		return text;
	}

	/**
	 * 生成32位大写UUID
	 * @return
	 */
	public static String randomUUID() {
		UUID uuid = UUID.randomUUID();
		return uuid.toString().replace("-", "").toUpperCase();
	}


}
